#ifndef HTTP_H
#define HTTP_H

#include <QDialog>
#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>

namespace Ui {
class http;
}

class http : public QDialog
{
    Q_OBJECT

public:
    explicit http(QWidget *parent = nullptr);
    void start();
    ~http();

private slots:
    void on_pushButton_clicked(bool checked);
    void onReadyRead();
    void connection();
    void onDisconnected();
    void first();
    void sec();

private:
    qint64 bytesAvailable() const;
    QTcpServer *server;
    QList<QTcpSocket*> tcpSktList;//用来存储所有客户端socket的链表

    Ui::http *ui;
};

#endif // HTTP_H
